package org.muxiao.seckill.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.muxiao.seckill.valitator.IsMobile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 登录 Vo 参数验证对象
 */
@Data
public class LoginVo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 手机号
     */
    @NotNull(message = "手机号不能为空")
    @IsMobile
    private String mobile;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Length(min = 32)
    private String password;
}
